<?php
namespace RTSCraft\MainBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\UniqueConstraint;
use Doctrine\ORM\Mapping\OrderBy;

/**
 * @ORM\Entity
 * @ORM\Table(name="UserRole")
 */
class UserRole
{
  /**
   * @ORM\Id
   * @ORM\Column(type="integer")
   * @ORM\GeneratedValue(strategy="AUTO")
   */
  protected $id;

  /**
   * @ORM\OneToOne(targetEntity="User", mappedBy="user_id")
   * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
   */
  protected $user_id;

  /**
   * @ORM\OneToOne(targetEntity="Role", mappedBy="role_id")
   * @ORM\JoinColumn(name="role_id", referencedColumnName="id")
   */
  protected $role_id;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set user_id
     *
     * @param RTSCraft\MainBundle\Entity\User $userId
     */
    public function setUserId(\RTSCraft\MainBundle\Entity\User $userId)
    {
        $this->user_id = $userId;
    }

    /**
     * Get user_id
     *
     * @return RTSCraft\MainBundle\Entity\User 
     */
    public function getUserId()
    {
        return $this->user_id;
    }

    /**
     * Set role_id
     *
     * @param RTSCraft\MainBundle\Entity\Role $roleId
     */
    public function setRoleId(\RTSCraft\MainBundle\Entity\Role $roleId)
    {
        $this->role_id = $roleId;
    }

    /**
     * Get role_id
     *
     * @return RTSCraft\MainBundle\Entity\Role 
     */
    public function getRoleId()
    {
        return $this->role_id;
    }
}